<?php

namespace App\Console;

use App\Console\Commands\Meeting;
use App\Console\Commands\MeetingList;
use App\Console\Commands\Sms;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected $commands=[
        Sms::class,
        Meeting::class,
        MeetingList::class
    ];
    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        // 每分钟执行一次  提示会议发起人会议时间短信
         $schedule->command('sms')->everyMinute();
         // 每分钟执行一次  30分钟无人进入会议就关闭会议
         $schedule->command('meeting')->everyMinute();
         // 每分钟执行一次 更新数据
        $schedule->command('meeting_list')->everyMinute();
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
